System and method for transcoding data

ABSTRACT

A method for transcoding data comprises receiving an input stream of data formatted according to a USB standard, the input stream is partitioned into a sequence of blocks having a fixed length. At least one input block of the input stream comprises one or more data symbols and one or more control symbols, the one or more control symbols include one or more general control symbols. The method also includes transcoding the at least one input block to generate at least one output block comprising a synchronization block and a control/data block. The control/data block comprises the one or more data symbols of the at least one input block, a representation of the one or more general control symbols of the at least one input block, and a plurality of indicators indicating locations of the one or more data symbols and control symbols in the at least one input block.

BACKGROUND

Field of the Disclosure

This disclosure pertains to a system and method for transcoding data.

Description of the Related Art

One popular transcoding method used for universal synchronous bus (USB)data, for example, is 8b/10b transcoding. In an 8b/10b transcoding, each8-bits of input stream of data is transcoded into 10-bits of outputstream of data. While 8b/10b is a popular method of transcoding USBdata, it has a drawback of adding significant transcoding overhead. Forexample, to transmit USB data at a typical data rate of 4 Gb/s, USB datatranscoded with 8b/10b scheme needs to be transmitted at a data rate of5 Gb/s due to the additional 2-bits for every 8-bits of input data. Thistranslates to 25% coding overhead with the 8b/10b transcoding scheme.

With the increase of the image resolution of video data, the data ratesof data transfer between devices is also increasing. For example, themigration from full high-definition (FHD, or 1080p resolution) with 1080lines to ultra-high-definition (UHD, or popularly referred to as 4K)with 2160 lines quadruples the data rate. The data rate for the USB3standard is 4 Gb/s. If an 8b/10b transcoding scheme is used on USB3data, the USB3 data need to be transmitted at a data rate of 5 Gb/s toeffectively transmit at 4 Gb/s due to the 25% coding overhead. Becauseof increasing data rates and limited bandwidth, it is useful to come upwith transcoding schemes that reduce the coding overhead and improve thetransmission efficiency.

SUMMARY

Embodiments of the present disclosure relate to a method for transcodingdata. The method includes receiving an input stream of data formattedaccording to a universal synchronous bus (USB) standard, where the inputstream is partitioned into a sequence of blocks having a fixed length.At least one input block of the input stream includes one or more datasymbols and one or more control symbols, where the one or more controlsymbols include one or more general control symbols. The method alsoincludes transcoding the at least one input block to generate at leastone output block including a synchronization block and a control/datablock. The control/data block includes the one or more data symbols ofthe at least one input block, a representation of the one or moregeneral control symbols of the at least one input block, and a pluralityof indicators indicating locations of the one or more data symbols andcontrol symbols in the at least one input block. Embodiments alsoinclude an apparatus to transcode data and a non-transitorycomputer-readable medium that includes a program, the program beingexecutable by a processor for performing the method for transcodingdata.

In one embodiment, the received input stream includes groups of at leastfour consecutive data symbols and groups of at least four consecutivecontrol symbols, wherein each of the groups of at least four consecutivecontrol symbols includes at least three general control symbols and endswith a delimiter control symbol, wherein the sequence of blocks includesat least one block having a group of at least four consecutive datasymbols beginning at each available symbol position.

In one embodiment, the transcoding method further includes determining afirst indicator including one or more bits indicating whether the atleast one input block ends with a control symbol or a data symbol anddetermining a second indicator indicating whether remaining symbolspositioned after the second indicator in the at least one output blockinclude at least one control symbol.

In one embodiment, responsive to the at least one input block includinga delimiter control symbol, the method further includes determining athird indicator including one or more bits indicating a location of thedelimiter control symbol in the at least one input block, the one ormore bits of the third indicator distinct from the one or more bits ofthe first and second indicators, wherein the at least one output blockfurther includes the third indicator.

In one embodiment, responsive to the at least one input block endingwith a data symbol, the method further includes determining a fourthindicator including one or more bits indicating a location of the one ormore data symbols before a control symbol in the at least one inputblock, the one or more bits of the fourth indicator distinct from theone or more bits of the first, second, and third indicators, wherein theat least one output block further includes the fourth indicator.

In one embodiment, responsive to the at least one input block endingwith a control symbol, the method further includes compressing a lastcontrol symbol of the at least one input block and combining the firstindicator, the second indicator, and the compressed last control symbolinto a transcoded symbol of the at least one output block.

In one embodiment, determining the first indicator includes setting amost significant bit of a first symbol of the at least one output blockto represent the first indicator.

In one embodiment, determining the second indicator includes setting aleast significant bit of a first control symbol of the at least oneoutput block to represent the second indicator.

BRIEF DESCRIPTION OF THE DRAWINGS

The teachings of the embodiments disclosed herein can be readilyunderstood by considering the following detailed description inconjunction with the accompanying drawings.

FIG. 1 is a high-level block diagram of a system for transcoding data,according to one embodiment.

FIG. 2 is a block diagram depicting an exemplary 64b/66b transcodingscheme, according to one embodiment.

FIG. 3 is a block diagram depicting an exemplary 40b/42b transcodingscheme, according to one embodiment.

FIG. 4 is a flow chart depicting a method for transcoding data,according to one embodiment.

FIG. 5 is a flow chart depicting a method for transcoding data,according to one embodiment.

FIG. 6 is a flow chart depicting a method for transcoding data wheninput block comprises only data symbols, according to one embodiment.

FIG. 7 is a flow chart depicting a method for transcoding data wheninput block ends with a data symbol, according to one embodiment.

FIG. 8 is a flow chart depicting a method for transcoding data wheninput block comprises only control symbols, according to one embodiment.

FIG. 9 is a flow chart depicting a method for transcoding data wheninput block ends with a control symbol and includes at least one datasymbol, according to one embodiment.

FIG. 10 is a block diagram of a device that performs transcoding ofdata, according to one embodiment.

DETAILED DESCRIPTION

The Figures (FIG.) and the following description relate to variousembodiments by way of illustration only. It should be noted that fromthe following discussion, alternative embodiments of the structures andmethods disclosed herein will be readily recognized as viablealternatives that may be employed without departing from the principlesdiscussed herein. Reference will now be made in detail to severalembodiments, examples of which are illustrated in the accompanyingfigures. It is noted that wherever practicable similar or like referencenumbers may be used in the figures and may indicate similar or likefunctionality.

Embodiments of the present disclosure relate to transcoding an inputstream of data in accordance with Universal Synchronous Bus 3.0 (USB3)standard or other related standards. The input stream includes asequence of blocks comprising data symbols and control symbols, whereeach block is of a fixed length (e.g., 64-bit or 8-byte long). Eachinput block is transcoded to achieve a low coding overhead. For example,a 64b/66b transcoding method has a coding overhead of 3.125%. Eachoutput block of the transcoded stream includes a plurality of indicatorsto indicate locations of the data symbols and the controls symbols ofeach input block. The transcoded stream can be transmitted to areceiver, and the received transcoded stream is then decoded to recoverthe input stream.

FIG. 1 depicts a high-level block diagram of a system 100 fortranscoding data, according to one embodiment. System 100 can include,among other components, devices 110 and 170; connectors 120 and 160; andtransceivers 130 and 150. System 100 can also include communicationchannel 140. Each pair of devices (devices 110 and 170), connectors(connectors 120 and 160) and transceivers (transceivers 130 and 150) canbe identical to each other and can be configured to performcomplimentary functions. For example, device 110, connector 120, andtransceiver 130 can be configured to transmit a stream of data whereasdevice 170, connector 160, and transceiver 150 can be configured toreceive a stream of data. Alternatively, transceiver 130 can be replacedwith a dedicated transmitter associated with device 110 and transceiver150 can be replaced with a dedicated receiver associated with device170.

Devices 110 and 170 can be specialized devices that can either generatedata themselves or pass on data that was generated remote from devices110 and 170. Devices 110 and 170 are described in connection with FIG.10 below. An input stream of data to be transmitted reaches transceiver130 through connector 120. Transceiver 130 (and transceiver 150)comprises a transmitter module (not shown) and a receiver module (notshown). The transmitter module transmits data while the receiver modulereceives data. A module can be implemented in either hardware, software,or a combination of hardware and software (i.e., firmware). In someembodiments, transceiver 130 is completely encompassed within device 110and transceiver 150 is completely encompassed within device 170.

Device 110 can transcode an input stream of data into a transcodedstream of data before transmitting the data through transceiver 130.Transcoding is a process of converting data from one encoding toanother, and encoding is a process of converting information from oneformat or code to another. Transcoding is typically performed when atarget device does not support information's format at its source andneeds to be converted into another format that is supported by thetarget device. Transcoding may also be performed for other reasons, forexample, to reduce cost, reduce power consumption, improve spectralefficiency, narrow signal spectrum, or to simplify the operations ofcircuits or devices subsequent in the signal path. The input stream,according to an embodiment, is in accordance with Universal SynchronousBus 3.0 (USB3) standard. It will be understood that the input streamdescribed throughout this disclosure is in accordance with USB3 exceptas otherwise indicated. The transcoded stream is transmitted bytransceiver 130 through communication channel 140 to a receiving device(e.g., device 170) through transceiver 150 and connector 160.Communication channel 140 is a bandwidth-limited channel and can beeither a wired channel or a wireless channel. Once the transmittedtranscoded stream is received by device 170, the transcoded stream canbe decoded to identify the input stream of data. In some embodiments,the decoding is performed by device 170. Alternatively, decoding can beperformed by a device remote to device 170.

FIG. 2 a block diagram depicting an exemplary 64b/66b transcodingscheme, according to one embodiment. An input stream of data that is tobe encoded comprises of a plurality of blocks of data, where each inputblock is of a fixed length. For example, in a 64b/66b transcodingscheme, each input block is 64-bit long. In the depicted 64b/66btranscoding scheme, a 2-bit sync portion is added to each 64-bit inputblock of data (divided into eight 8-bit “symbols” also referred toherein as “octets”, or generally also referred to as “byte”) to generatea 66-bit block of output stream of data corresponding to the 64-bitinput block. Because 2-bits are added to every 64-bit input block, thecoding overhead of a 64b/66b transcoding scheme is 3.125% (i.e.,(66-64)/64*100), which is much lower than that of 8b/10b transcoding(25%). FIG. 2 represents a 64b/66b transcoding scheme for input block210 in USB3 standard format.

The USB3 standard places various constraints on encoding an input streamof data comprising a plurality of 64-bit blocks of input data. First,for a given 64-bit block of input data comprising eight octets, datasymbols can begin at any of the eight octets. A second constraint isplaced on control symbols such that the input stream comprises groups ofcontrol symbols, where each group of control symbols comprises at leastfour consecutive control symbols. Each group of controls symbols caninclude at least three general control symbols and can end with adelimiter control symbol. For example, a delimiter control symbol can bean End Packet Framing (EPF) symbol that signifies a transition from acontrol symbol to a data symbol. In some embodiments, all symbols of thegroup of control symbols are comprised in one 64-bit input block.Alternatively, consecutive control symbols of the group of controlsymbols can be comprised in two or more successive 64-bit input blocks.

A third constraint is placed on data symbols such that the input streamcomprises groups of data symbols, where each group of data symbolscomprises at least four consecutive data symbols. In some embodiments,all symbols of the group of data symbols are comprised in one 64-bitinput block. Alternatively, consecutive data symbols of the group ofdata symbols can be comprised in two or more successive 64-bit inputblocks. A fourth constraint states that a transition from a controlsymbol to a data symbol must use an EPF symbol as a delimiter controlsymbol. A fifth constraint states that there will be no delimiter symbolto transition from a data symbol to a control symbol.

Given the above-stated constraints, there are 28 different possiblecombinations of data symbols and control symbols that can appear in 8consecutive symbols of USB3 data. FIG. 2 shows a mapping from eachpossible combination of a 64-bit input block of a USB3 input stream toits encoded output according to the 64b/66b transcoding scheme describedherein. Each row of FIG. 2 represents a different combination of dataand control symbols in the 64-bit input block and its correspondingtranscoded output block for a total of 28 rows labelled as R1 throughR28. Each possible block of input data 210 can comprise both datasymbols and control symbols. A “data symbol” as used herein is an octet(i.e., 8-bits or generally referred to as a byte) representinginformation transmitted over a communication channel. A “control symbol”as used herein is a special symbol that provides contextual informationrelating to achieving symbol alignment and is used for framing data andmanaging a communication link. In the original USB3 10-bit mapping ofeach symbol, special characteristics make control symbols uniquelyidentifiable from data symbols. For example, a control symbol may beused to indicate, for example, start-of-frame, end-of-frame, link idle,skip and similar link-level conditions associated with data symbolstransmitted over the communication channel. In FIG. 2, data symbols arerepresented as Dk, where k ranges from 0 through 7. Control symbols ofthe input blocks 210 and the control/data block portion 230 of theoutput are represented as Ck, where k ranges from 0 through 7. The inputblocks 210 can also comprise a delimiter control symbol that isrepresented as EPF. For example, EPF can signify a transition from acontrol symbol to a data symbol.

The output blocks 240 each comprise a synchronization block 220 and acontrol/data block 230 comprising eight octets (octet0 through octet7).Synchronization block 220 comprises a 2-bit sync portion that providesan indication whether there is at least one control symbol in thecorresponding input block 210 being encoded. For example, if there is nocontrol symbol in the corresponding input block 210 the 2-bit syncportion is set to a value of “01,” as depicted in row R1 of FIG. 2. If,however, there is at least one control symbol in the corresponding inputblock 210, the 2-bit sync portion is set to a value of “10,” as depictedin every row other than row R1 of FIG. 2. In alternative embodiment, the2-bit sync portion can be set to different values (e.g., 10 for nocontrol symbol and 01 for at least one control symbol). Alternatively,synchronization block 220 can comprise 1-bit or more than 2-bits(thereby changing coding overhead) to indicate the presence of (or lackof) control symbols in the input block 210 being encoded.

Each output block 240 also comprises a control/data block 230 thatincludes eight octets representing a transcoded version of the eightsymbols of the corresponding input block 210 being encoded. Each octetis 8-bit long and typically represents either a data symbol or a controlsymbol. In some instances, control symbols of a given input block 210are represented with a modified version of the control symbol in thecorresponding control/data block 230. For example, the first symbol ofthe input block 210 in row R28 is represented by C0. In control/datablock 230, input control symbol C0 is represented as 0_C0′_0. Here, C0′represents a 6-bit compressed version of the 8-bit C0. The additionalleading and trailing bits (‘0’ in this instance) can be used as anindicator to represent additional information as will be described infurther detail below. In alternative embodiments, the control symbolscan be represented by a fewer than or more than 6-bits. In alternativeembodiments, the indicator may be in positions other than the leadingand trailing bits of the octet. Control/data block 230 also comprises,for some rows, an octet represented by ones and zeroes (e.g., octet0 ofrow R2). Control/data block 230's octet0 of row R2 can be a patternindicator that can indicate various features of the corresponding inputblock 210. For example, the pattern indicator can indicate whether theinput block 210 ends with a control symbol or a data symbol as shown incontrol/data block 230 using the leading bit of octet0. Alternatively orin addition, the pattern indicator can indicate in a control symbol ofthe output block 240 whether the remaining symbols of the output block240 comprise control symbols as shown, for example in control/data block230, using the trailing bit of octet0. In alternative embodiments, thepattern indicator can indicate other features within the scope of thisdisclosure.

FIG. 3 is a block diagram depicting an exemplary 40b/42b transcodingscheme for USB3 data, according to one embodiment. In a 40b/42btranscoding scheme, a 2-bit sync portion is added to each 40-bit inputblock to generate a 42-bit output block corresponding to the 40-bitinput block. Because 2 bits are added to every 40-bit input block, thecoding overhead of a 40b/42b transcoding scheme is 5% (i.e.,(42-40)/40*100), which is much lower than that of 8b/10b transcoding(25%). FIG. 3 represents a 40b/42b transcoding scheme for input block310 in USB3 standard format.

In light of the constraints associated with USB3 data, as describedabove with reference to FIG. 2, there are 10 different possiblecombinations of data symbols and control symbols that can appear in anoctet of USB3 data. FIG. 3 shows a mapping from each possiblecombination of a 40-bit input block of a USB3 input stream to itsencoded output block 340 according to the 40b/42b transcoding schemedescribed herein. Each row of FIG. 3 represents a different combinationof data and control symbols in the 40-bit input block and itscorresponding transcoded output block for a total of 10 rows labelled asR1 through R10. Each possible block of input data 310 can comprise bothdata symbols and control symbols conforming to restrictions specified byUSB3 protocol. In FIG. 3, data symbols are represented as Dk, where kranges from 0 through 4. Control symbols of the input blocks 310 arerepresented as Ck, where k ranges from 0 through 4. The input blocks 310can also comprise a delimiter control symbol that is represented as EPF.For example, EPF can signify a transition from a control symbol to adata symbol.

The input blocks 310 are similar to the input blocks 210 and the outputblocks 340 comprises a synchronization block 320 and a control/datablock 330, similar to the output blocks 240 as described above withreference to FIG. 2. The main difference between FIG. 2 and FIG. 3 isthat while FIG. 2 depicts a transcoding scheme on a 64-bit input block,FIG. 3 depicts a transcoding scheme on a 40-bit input block.Consequently, control/data block 330 comprises five octets (e.g., octet0through octet4) as opposed to eight octets of control/data block 230.Accordingly, all features described in FIG. 2 above, are equallyapplicable with regards to FIG. 3.

FIG. 4 is a flow chart depicting a method for transcoding a stream ofdata, according to one embodiment. First, an input stream of data isreceived 410 at a device (e.g., device 110). In some embodiments, thedevice itself can generate the input stream. The input stream can bepartitioned into a sequence of blocks having a fixed length. Forexample, each sequence of blocks can have a fixed length of 64-bits.Alternatively, the fixed length can be 128-bits. Each block of the inputstream can comprise one or more data symbols and one or more controlsymbols. Control symbols can comprise a general control symbol and adelimiter control symbol. A general control symbol can be controlsymbols that comprise a byte used to indicate, for example,start-of-frame, end-of-frame, link idle, skip and similar link-levelconditions associated with data symbols transmitted over thecommunication channel. A delimiter control symbol, for example, cansignify a transition from a general control symbol to a data symbol. InUSB3 data, an exemplary delimiter control symbol is End Packet Framing(EPF) symbol that signifies a transition from a general control symbolto a data symbol.

The input stream is then transcoded 420 according to a procedure toconvert the input stream into another format that is supported by thetarget device. An exemplary procedure for transcoding input stream isdescribed with reference to FIGS. 5 through 9 below. The transcodedstream of data is then output 430 to transmit the transcoded stream tothe target device for further processing. In some embodiments, thedevice receiving (or generating) the input stream also transcodes theinput stream and further transmits the transcoded stream. Alternatively,transcoding and transmitting is performed by a device that is differentfrom the device receiving (or generating) the input stream.

FIG. 5 is a flow chart depicting a method for transcoding a block of aninput stream of data, according to one embodiment. The transcoding ofthe input block can be performed by a transcoder (e.g., transcoder 1050)as described later with reference to FIG. 10. The transcoding methodbegins by receiving 505 a block of USB3 input data having a fixed lengthof N bytes, depicted as IN[1:N]. For example, IN[1:N] can be aneight-octet (64-bit) long block of input data corresponding to one ofthe input blocks 210 depicted in FIG. 2. The received input blocktypically comprises data symbols and may also include one or morecontrol symbols as described above with reference to FIG. 4. Thetranscoder then determines 510 whether the received input block includesonly data symbols (e.g., whether the input block corresponds to row R1in the mapping table of FIG. 2 or row R1 in the mapping table of FIG.3). If the transcoder determines that the received input block includesonly data symbols (i.e., no control symbols), the input block istranscoded 515 such that a control/data block of the transcoded outputblock is the same as the received input block. The process oftranscoding 515 is described in further detail with reference to FIG. 6.

FIG. 6 is a flow chart depicting a method for transcoding data wheninput block comprises only data symbols, according to one embodiment.When a determination is made that the input block comprises only datasymbols, an indicator can be provided 610 to indicate that the inputblock comprises only data symbols and does not comprise any controlsymbols. For example, in a 64b/66b encoding, synchronization block 220corresponding to row R1 of FIG. 2 includes an 2-bit sync indicator(e.g., sync[1:2]) with a value “01” signifying that the input blockcorresponding to row R1 includes only data symbols and no controlsymbols. FIG. 6 depicts the received input block as IN[1:M], where thelength of the received input block is M bytes. In some embodiments, M isthe same as N bytes of FIG. 5. Alternatively M can be different from N.

Next, each symbol of the input block, IN[1:M], is transcoded to generate620 transcoded symbols of a control/data block, OUT[1:M]. The generatedtranscoded symbols of the control/data block, OUT[1:M], are identical tothe symbols of input block, IN[1:M]. For example, row R1 of FIG. 2depicts control/data block OUT[1:M] from octet0 to octet7 such that eachof the octets of the control/data block are identical to theircorresponding octets of the input block. Next, an output block isprovided 630 by combining the provided indicator (i.e., sync[1:2]) andgenerated control/data block (i.e., OUT[1:M]). For example, row R1 ofFIG. 2 depicts output block that combines synchronization block 220indicating “01” and control/data block 230 comprising symbols that areidentical to their corresponding symbols of input block 210.

Referring back to FIG. 5, if the transcoder determines that the receivedinput block includes at least one control symbol (e.g., the input blockcorresponds to any of rows R2-R28 in the 64b/66b example of FIG. 2, orthe input block corresponds to any of rows R2-R10 in the 402/42b exampleof FIG. 3), an indicator can be provided 520 to indicate that the inputblock comprises at least one control symbol. For example,synchronization block 220 corresponding to row R2 of FIG. 2 includes an2-bit sync indicator with a value “10” signifying that the input blockcorresponding to row R2 includes at least one control symbol (i.e., EPFsymbol represented by the first octet of input block 210). Next, thetranscoder determines 525 whether the received input block ends with acontrol symbol (e.g., whether the input block corresponds to any of rowsR15-R28 in the example of FIG. 2 or rows R6-R10 in the example of FIG.3). If the transcoder determines that the received input block does notend with a control symbol (i.e., ends with a data symbol as in rowsR2-14 in FIG. 2 or rows R2-R5 in FIG. 3), the input block is transcoded530 such that a control/data block corresponding to the transcodedoutput block includes a plurality of pattern indicators to indicatelocations of data and control symbols of input block.

After a determination is made that the input block ends with either adata symbol or a control symbol, one of the symbols (e.g., an octet ofthe eight octets) of the output block can be generated to include afirst indicator to indicate whether the input block ends with a controlsymbol or a data symbol. For example, the first indicator indicateswhether the input block ends with a control symbol or a data symbol byusing a bit of a symbol of the output block. In some embodiments, thesymbol comprising the bit of the first indicator can be the first octet(e.g., octet0 of control/data block 230). For example, the mostsignificant bit (MSB) of octet0 (i.e., the first bit) represents thefirst indicator. Input block 210 of row R6 of FIG. 2 ends with a datasymbol D3 and the MSB representing the first indicator has a value of“1.” Another example of row R18 of FIG. 2 depicts that input block 210ends with control symbol C3 and the MSB representing the first indicatorhas a value of “0.” In one embodiment, the first indicator can representa value of “1” to indicate that input block 210 ends with a controlsymbol and a value of “0” to indicate that input block 210 ends with adata symbol. The first indicator can be included in a bit other than MSBof a symbol and also in a symbol other than the first octet of thecontrol/data block corresponding to the output block. The process oftranscoding 530 is described in further detail with reference to FIG. 7.

FIG. 7 is a flow chart depicting a method for transcoding data when theinput block includes at least one control symbol and when the inputblock ends with a data symbol, according to one embodiment. In theexample 64b/66b encoding of FIG. 2, this process is performed when theinput block corresponds to any of rows R2-R14, and in the example40b/42b encoding of FIG. 3, this process is performed when the inputblock corresponds to any of rows R2-R5. FIG. 7 depicts the receivedinput block as IN[1:M], where the length of the received input block isM bytes. In some embodiments, M is the same as N bytes of FIG. 5.Alternatively M can be different from N. When a determination is madethat the input block ends with a data symbol, one of the symbols (e.g.,an octet of the eight octets of the output block) of the output blockcan be generated 710 to include a plurality of indicators furtherincluding a first indicator to indicate that the input block ends with adata symbol, a second indicator to indicate a location of a delimitercontrol symbol in the input block, and a third indicator to indicate alocation of any data symbols appearing before control symbols in theinput block. In one embodiment, the plurality of the indicators areincluded in the first symbol (e.g., octet0) of a control/data block(e.g., control/data block 230 of FIG. 2) of the output block.Alternatively, the plurality of indicators can be included in othersymbols of the output block. The first, second, and third indicators areeach represented by one or more bits of an indicator symbol (e.g.,octet0) that are specifically assigned to that their respectiveindicators. For example, in one embodiment, the first (most significant)bit represents the first indicator, the next three bits represent thesecond indicator, the next three bits represent the third indicator, andthe last (least significant) bit represents a fourth indicator (i.e., acontrol indicator) discussed in further detail below with reference toFIGS. 8 and 9. In one embodiment, the second and third indicators can becombined into a single indicator.

The first indicator indicates that the input block ends with a datasymbol by using a bit of the first octet (e.g., octet0 of control/datablock 230). The second indicator indicates a location of a delimitercontrol symbol in the input block by using one or more bits of a symbolof the output block. In some embodiments, the symbol comprising the oneor more bits of the second indicator can be the first octet (e.g.,octet0 of control/data block 230). For example, bits 5 through 7 ofoctet0 of control/data block 230 represent the second indicator, wherebit 8 is the MSB in the left and bit 1 is the LSB in the right. Row R6of FIG. 2 includes a delimiter control symbol, EPF, in the fifth octet(i.e., octet4) of input block 210. In USB3 data, EPF (a delimitedcontrol symbol) signifies a transition from control symbols to datasymbols such that an EPF symbol immediately precedes a data symbol. Bits5 through 7 of octet0 of control/data block 230 of row R6 indicate thelocation of EPF by a value of “101.” In this exemplary embodiment, bits5 through 7 represent a binary-weighted representation of the locationof the EPF symbol. In row R6 of FIG. 2, the EPF symbol is the fifthoctet of input block 210. A 3-bit binary-weighted representation ofdecimal value five is “101.” Another example of row R12 of FIG. 2depicts that delimiter control symbol, EPF, appears in the seventh octet(i.e., octet6) of input block 210. Bits 5 through 7 of octet0 ofcontrol/data block 230 of row R12 indicate the location of the EPFsymbol by a binary-weighted value of “111.”

The third indicator can indicate a location of data symbols that appearbefore a control symbol (including general control symbols and delimitercontrol symbols) in the input block by using one or more bits of asymbol of the output block. In some embodiments, the symbol comprisingthe one or more bits of the third indicator can be the first octet(e.g., octet0 of control/data block 230). For example, bits 2 through 4of octet0 of control/data block 230 represent the third indicator. RowR6 of FIG. 2 includes a data symbol D0 in the first octet (i.e., octet0)of input block 210 before a first control symbol (i.e., C0 in octet1)appears in input block 210. Bits 2 through 4 of octet0 of control/datablock 230 of row R6 indicate the location of data symbol D0 by a valueof “100.” Another example of row R12 of FIG. 2 depicts that input block210 includes two data symbols (i.e., D0 in octet0 and D1 in octet1)before a first control symbol (i.e., C0 in octet2) appears in inputblock 210. Bits 2 through 4 of octet0 of control/data block 230 of rowR12 indicate the location of data symbols D0 and D1 by a value of “110.”In some embodiments, the second and third indicators can include fewerthan or more than three bits used in the exemplary embodiment of FIG. 2.The second and third indicators can be included in a symbol other thanthe first octet of the control/data block corresponding to the outputblock as depicted in FIG. 2.

Next, the delimiter control symbol (i.e., the last control symbol) ofthe input block is identified and removed 720 from the symbols to betranscoded. When input block ends with a data symbol in USB3 data, thelast control symbol of the input block is a delimiter control symbol(e.g., EPF symbol). While the EPF symbol is being removed from thesymbols that will be transcoded as output block, an indication of thelocation of the EPF symbol is still provided in the output block asdiscussed above with reference to transcoding 710. One method ofidentifying the EPF symbol can be by identifying a predetermined patternassociated with the EPF symbol. An example depicting the identificationand removal of EPF is shown in row R6 of FIG. 2, which includes the EPFsymbol as the fifth symbol (i.e., octet4) of input block 210. As can beseen in control/data block 230 of row R6, the EPF symbol is removed.

Next, the remaining seven symbols of the input block are transcoded 730.In one embodiment where the plurality of indicators are represented inthe first symbol of the control/data block of the output block (i.e.,OUT[1] of OUT[1:8]), the remaining seven symbols (other than EPF symbol)can be transcoded as the last seven symbols of the output block (i.e.,OUT[2:8]). The last seven symbols of the output block can be transcodedsuch that the output block symbols are identical to the input blocksymbols after removal of the EPF symbol. For example, row R6 of FIG. 2includes an EPF symbol as the fifth symbol of input block 210. Afterremoving the EPF symbol (i.e., IN[5]) as described with reference tostep 720 above, the input block is left with IN[1:4] and IN[6-8]. Asdepicted in control/data block 230 of row R6 of FIG. 2, the remainingseven symbols of input block 210 (i.e., IN[1:4] and IN[6:8]) aretranscoded as OUT[2:8]. Accordingly, IN[1:4] is mapped to OUT[2:5] andIN[6:8] is mapped to OUT[6-8].

After removing the delimiter control symbol and transcoding theremaining seven input block symbols as the last seven output blocksymbols, the first symbol of the output block (OUT[1] including theplurality of indicators) and the last seven output block symbols(OUT[2:8]) are combined 740 to provide all eight symbols of the outputsymbol (OUT[1:8]). For example, row R6 of FIG. 2 depicts an output blockby combining the first symbol (i.e., OUT[1] or octet0) showing“11001011” (representing the plurality of indicators) with that ofcontrol/data block 230 showing a sequence of symbols “D0 C0 C1 C2 D1 D2D3 D4” corresponding to OUT[2:8] (i.e., octet1:octet7). In anotherembodiment, the control symbols of R3 to R14 may be compressed or codedin another format, to improve error resilience. Control code compressionis described in more details in FIG. 8.

Referring back to FIG. 5, if the transcoder determines 525 that thereceived input block ends with a control symbol, the transcoder furtherdetermines 535 whether all symbols of the input block are controlsymbols (i.e., no data symbols). If the transcoder determines that thereceived input block includes only control symbols, the input block istranscoded 540 to include a representation of the control symbols of theinput block in the output block. The process of transcoding 540 isdescribed in further detail with reference to FIG. 8.

FIG. 8 is a flow chart depicting a method for transcoding data wheninput block comprises only control symbols, according to one embodiment.FIG. 8 depicts the received input block as IN[1:M], where the length ofthe received input block is M bytes. In some embodiments, M is the sameas N bytes of FIG. 5. Alternatively M can be different from N. When adetermination is made that the input block (i.e., IN[1:M]) includes onlycontrol symbols (e.g., the input block corresponds to row R28 in the64b/66b example of FIG. 2, or the input block corresponds to row R10 inthe 402/42b example of FIG. 3), each control symbol of the input blockis transcoded 810 such that each symbol of the output block provides arepresentation of the control symbols of the input block. One method ofproviding such representation is by reducing a number of bits used torepresent information in each control symbol while still representingthe same information. For example, each transcoded control symbol'sinformation can be represented in 6-bits to represent the sameinformation of each symbol that originally is 8-bits long in the inputblock as depicted in row 28 of FIG. 2. Row 28 depicts all controlsymbols (i.e., C0:C7) for input block 210 and a control/data block 230of the transcoded output that depicts a representation of the inputcontrol symbols (i.e., 0_C0′_0:0_C7′_0). Here, C0′ and C7′ represent a6-bit compressed version of input control symbols, C0 and C7, that areoriginally 8 bits long. For USB3 data, there can be a total of 16different types of control symbols including general control symbols anddelimiter control symbols. While 4 bits are sufficient to uniquelyrepresent each of the 16 different USB3 control symbols, using 6 bitswill enable the transcoder to use 2 bits for other features like errorcorrection or error detection.

Next, for each input control symbol, a control indicator is generated820 to indicate whether the remaining symbols positioned after thecontrol symbol of the input block comprise only data symbols or compriseat least one control symbol. In an exemplary embodiment where 6 bits areused in the transcoded control symbol to represent the information ofthe input control symbol, one or both of the two remaining bits can beused for the control indicator. For example, FIG. 2 depicts bits 1 and 8of transcoded control symbol are used for control indicator as shown inrow 28. Input block 210 of row 28 includes all control symbols. Becauseall input symbols are control symbols (i.e., no data symbols), thecontrol indicator for each of the transcoded output symbols provides anindication that there are no data symbols. In row 28 of FIG. 2, thecontrol indicator (bits 1 and 8) has a value of “0_Ck_0” for all eightcontrol symbols providing an indication that none of the symbols of theinput block comprise a data symbol. After providing a representation ofeach control symbol and generating a control indicator for each controlsymbol, all eight control symbols are combined 830 to provide thetranscoded output block (OUT[1:8]).

Referring back to FIG. 5, if transcoder determines 535 that all symbolsof the input block are not control symbols (i.e., input block ends witha control symbol but includes at least one data symbol), then the last Knumber of input symbols (i.e., IN[N−K+1:N]) comprising consecutivecontrol symbols are identified and transcoded 545 as the first K numberof symbols of the output block (i.e., OUT[1:K]). Next, the remaininginput symbols (i.e., IN[1:N−K]) are transcoded 550 by indicating alocation of data and control symbols of the remaining input symbols. Theprocess of transcoding 545 and 550 are described in further detail withreference to FIG. 9.

FIG. 9 is a flow chart depicting a method for transcoding data wheninput block ends with a control symbol and includes at least one datasymbol, according to one embodiment. When a determination 535 is madethat the input block (i.e., IN[1:M]) ends with a control symbol andincludes at least one data symbol (e.g., the input block corresponds toany of rows R15-R27 in the 64b/66b example of FIG. 2, or the input blockcorresponds to any of rows R6-R9 in the 402/42b example of FIG. 3), thelast K symbols of the input block (i.e., IN[M−K+1:M]) that compriseconsecutive control symbols are identified 910, where IN[1:M] is theinput block to be transcoded. Identification 910 can begin with the lastsymbol of the input block (i.e., IN[M]), which is already identified asa control symbol. Identification 910 then proceeds to analyze whetherthe symbol immediately prior to the last symbol (i.e., IN[M−1]) is alsoa control symbol. Identification 910 continues this process until allconsecutive control symbols from the end of the input block areidentified. The number of identified consecutive control symbols fromthe end of the input block is represented by K, such that the symbolsIN[M−K+1:M] are identified as the last K consecutive control symbols.For example, row 23 of FIG. 2 depicts input block 210 that includesthree consecutive control symbols (C1, C2, and C3 as input symbols 6through 8) at the end. In this example, M=8 and K is identified as 3.Accordingly, identification 910 will identify IN[6:8] as the last threeinput symbols as the last three consecutive control symbols from the endof the input block.

After identifying the last K input symbols (i.e., IN[M−K+1:M]), theidentified last K input symbols are transcoded 920 as the first Ksymbols of the output block as described above with reference to FIG. 8.While the transcoding process of FIG. 8 describes transcoding of aninput block, IN[1:M], the transcoding process is equally applicable toan input block of a different length, IN[M−K+1:M], with a length of M−K.For example, row 23 of FIG. 2 depicts input block 210 that includesthree consecutive control symbols (C1, C2, and C3 as input symbols 6through 8) at the end. In this example, M=8 and K is identified as 3.Accordingly, transcoding of FIG. 8 would transcode IN[6:8] in accordancewith its method. After transcoding the identified last K input symbols(i.e., IN[M−K+1:M]), the transcoded last K input symbols are mapped asthe first K symbols of the output block (i.e., OUT[1:K]). For theexample of row 23 of FIG. 2, the last three consecutive symbols of theinput block correspond to the first three symbols of the output blockdepicted as octet0 to octet2 of control/data block 230 of row 23.

One difference between the method described with reference to FIG. 8 andthe transcoding of the identified last K consecutive symbols is that inFIG. 8, all symbols of the input block are only control symbols (i.e.,no data symbols) and accordingly, the control indicator will indicatethat there are no data symbols in the input block. While it is stillcorrect that the last K symbols of the input with consecutive controlsymbols (i.e., IN[M−K+1:M]) also includes only control symbols, it ispossible that the other symbols of the input block (i.e., IN[1:M−K]) caninclude one or more control symbols. In a case where the remainingsymbols of the input block include only data symbols, the controlindicator of the output symbol corresponding to the last symbol of thelast K input symbols with consecutive control symbols (i.e., OUT[K]corresponding to IN[M]) will be modified if the remaining input symbols(i.e., IN[1:M−K]) only include data symbols. For example, row 19 of FIG.2 depicts input block 210 that includes two consecutive control symbols(i.e., K=2) at the end of input block 210, and the other six symbols aredata symbols. Control/data block 230 corresponding to row 19 depicts arepresentation of input block 210's control symbols (i.e., 0_C0_0 and0_C1_1). The last control symbol in the K symbols (i.e., input symbolC1) depicts a “0” in its most significant bit (MSB) and a “1” in itsleast significant bit (LSB) to signify that the rest of the symbols ofoutput block 240 are all data symbols. In other cases where remainingsymbols include one or more data symbols but also include one or morecontrol symbols, the control indicator of the output symbol (i.e.,OUT[K−1]) corresponding to the last symbol of the last K input symbolswith consecutive control symbols (i.e., IN[M]) need not be modified.

After transcoding 920 the identified last K input symbols as the first Ksymbols of the output block, the remaining symbols of the input block(i.e., IN[1:M−K]) are transcoded as the remaining symbols of the outputblock (i.e., OUT[K+1:M]) depending on whether the remaining symbolsinclude only data symbols or not. Step 930 determines whether theremaining symbols (i.e., IN[1:M−K]) include only data symbols. Ifdetermination 930 returns that the remaining symbols only include datasymbols, the remaining symbols are transcoded in accordance with thetranscoding method described above with reference to FIG. 6. If on theother hand, determination 930 returns that the remaining symbols includeat least one control symbol, the remaining symbols are transcoded asdescribed above with reference to FIG. 7. While the transcoding processof FIG. 7 describes transcoding of an input IN[1:M], the transcodingprocess is equally applicable to an input block of different length,IN[1:M−K]. In row 23 of FIG. 2, for example, input block 210 includesthree consecutive controls symbols at the end (i.e., K=8) and includesthe remaining five symbols (i.e., EPF, D0, D1, D2, and D3) that end witha data symbol (i.e., D3). For this example, transcoding 950 willtranscode IN[1:5] in accordance with transcoding method of FIG. 7 andmap IN[1:5] and OUT[6:8], where OUT[5] would include a plurality ofindicators indicating whether the remaining input symbols (i.e.,IN[1:5]) ends with a control symbol or a data symbol, indicating alocation of a delimiter control symbol (i.e., EPF symbol) in theremaining input symbols, and indicating a location of data symbolsappearing before control symbols in the remaining input symbols.

After transcoding 940 or transcoding 950, where the remaining inputsymbols (i.e., IN[1:M−K]) are transcoded as the remaining symbols of theoutput block (i.e., OUT[K+1:M]), the first K symbols and the remainingsymbols of the output block are combined 960 to provide the transcodedoutput block (OUT[1:8]).

FIG. 10 is a block diagram of a device (device 1000) that performstranscoding of data, according to one embodiment. Device 100 cancorrespond to either or both off devices 110 and 170 described inFIG. 1. Device 100 described herein may be implemented, for example, asan integrated circuit (e.g., an Application-Specific Integrated Circuit(ASIC) or using a field-programmable gate array (FPGA), in software(e.g., loading program instructions to a processor from acomputer-readable storage medium and executing the instructions by theprocessor), or by a combination of hardware and software.

In some embodiments, device 1000 comprises an interconnect or bus 1002(or other communication means) for transmission of data. Device 1000 caninclude a processing means such as one or more processors 1004 coupledwith bus 1002 for processing information. Processors 1004 can compriseone or more physical processors and/or one or more logical processors.While bus 1002 is illustrated as a single interconnect for simplicity,it is understood that bus 1002 can represent multiple differentinterconnects or buses. Bus 1002 shown in FIG. 10 is an abstraction thatrepresents any one or more separate physical buses, point to pointconnections, or both connected by appropriate bridges, adapters,controllers and/or the like.

In some embodiments, device 1000 further comprises a random accessmemory (RAM) or other dynamic storage device depicted as main memory1012 for storing information and instructions to be executed byprocessors 1004. Main memory 1012 can include an active storage ofapplications including a browser application for using in networkbrowsing activities by a user of device 1000. Main memory 1012 canfurther include certain registers or other special purpose memory.

Device 1000 can also comprise a read only memory (ROM) 1016 or otherstatic storage device for storing static information and instructionsfor processors 1004. Device 1000 can further include one or morenon-volatile memory elements 1018 for the storage of certain elements,including, for example, flash memory, a hard disk, solid-state drive.Device 1000 can comprise transceiver module 1020 that is coupled to bus1102. Transceiver module 1020 can further comprise a transmitter moduleand a receiver module. Transceiver module 1020 comprises one or moreports 1022 to connect to other devices (not shown). For example, device1000 can function as a device 110 and/or device 170 depicted in FIG. 1.

Device 1000 can also comprise circuit logic 1040 coupled to bus 1002 andconfigured to receive information from a second device (not shown)coupled through ports 1022. The information received by circuit logic1040 can include an input stream of data to be transcoded or transcodedstream of data to be decoded. Device 1000 can further comprisetranscoder module 1050 for transcoding data. For example, input streamreceived through ports 1022 and transceiver module 1020 can betranscoded by transcoder module 1050. In some embodiments, transcodermodule can also perform decoding of data that has already beentranscoded before received by device 1000.

Device 1000 can also comprise output display 1026 and coupled via bus1102. In some embodiments, display 1026 can include a liquid crystaldisplay (LCD) or any other display technology, for displayinginformation or content to a user, including three-dimensional (3D)displays. Alternatively, display 1026 can include a touch screen thatcan also be part of input device 1024. In some environments, display1026 can include an audio device, such as a speaker for providing audioinformation. Device 1000 can also comprise power device 1030 that cancomprise a power supply, a battery, a solar cell, a fuel cell, or otherdevice for providing or generating power. Any power provided by powerdevice 1030 can be distributed as required to elements of device 1000.

While this disclosure described an input stream of data to be transcodedas USB3 data, it will be understood that the input stream described inthis disclosure can be in accordance with other standards or otherapplications. While particular embodiments and applications of thepresent disclosure have been illustrated and described, it is to beunderstood that the embodiments are not limited to the preciseconstruction and components disclosed herein and that variousmodifications, changes and variations may be made in the arrangement,operation and details of the method and apparatus of the presentdisclosure disclosed herein without departing from the spirit and scopeof the disclosure as defined in the appended claims.

What is claimed is:
 1. A method for transcoding data, the methodcomprising: receiving, at a device, an input stream of data partitionedinto a sequence of blocks having a fixed length number of symbols, thesequence of blocks including an input block comprising at least one datasymbol, at least one general control symbol, and a delimiter controlsymbol; generating a synchronization block of an output block indicatingwhether the input block comprises at least one of the at least onegeneral control symbol and the delimiter control symbol; generating anindicator output symbol of a control/data block of the output block, theindicator output symbol comprising at least a first indicator comprisinga first value if the input block ends with a general control symbol orthe delimiter control symbol and the first indicator comprising a secondvalue if the input symbol ends with a data symbol, a second indicatorindicating a position of the delimiter control symbol in the inputblock, and a third indicator indicating one or more positions of datasymbols appearing before the delimiter control symbol in the inputblock; generating one or more control/data output symbols of thecontrol/data block of the output block, the one or more control/datasymbols including the at least one data symbol of the input block andthe at least one general control symbol of the input block; andoutputting the output block.
 2. The method of claim 1, wherein thereceived input stream comprises groups of at least four consecutive datasymbols and groups of at least four consecutive control symbols, whereineach of the groups of at least four consecutive control symbols includesat least three general control symbols and ends with a delimiter controlsymbol, wherein the sequence of blocks includes at least one blockhaving a group of at least four consecutive data symbols beginning ateach available symbol position.
 3. The method of claim 1, wherein theindicator output symbol further comprises a fourth indicator indicatingwhether remaining symbols positioned after the fourth indicator in theat least one output block comprise at least one control symbol.
 4. Themethod of claim 3, further comprising: responsive to the at least oneinput block ending with a control symbol, compressing a last controlsymbol of the input block, and combining the first indicator, the fourthindicator, and the compressed last control symbol into a compressedcontrol symbol of the control/data block of the output block.
 5. Themethod of claim 3, wherein determining the fourth indicator comprises:setting a least significant bit of the compressed control symbol of theone output block to represent the fourth indicator.
 6. The method ofclaim 1, wherein determining the first indicator comprises: setting amost significant bit of the indicator output symbol of the output blockto represent the first indicator.
 7. An apparatus for transcoding datacomprising: a transceiver configured for receiving an input stream ofdata partitioned into a sequence of blocks having a fixed length numberof symbols, the sequence of blocks including, an input block comprisingat least one data symbol, at least one general control symbol, and adelimiter control symbol; a transcoder configured for generating asynchronization block of an output block indicating whether the inputblock comprises at least one of the at least one general control symboland the delimiter control symbol, generating an indicator output symbolof a control/data block of the output block, the indicator output symbolcomprising at least a first indicator comprising a first value if theinput block ends with a general control symbol or the delimiter controlsymbol and the first indicator comprising a second value if the inputsymbol ends with a data symbol, generating a second indicator indicatinga position of the delimiter control symbol in the input block,generating a third indicator indicating one or more positions of datasymbols appearing before the delimiter control symbol in the inputblock, generating one or more control/data output symbols of thecontrol/data block of the output block, the one or more control/datasymbols including the at least one data symbol of the input block andthe at least one general control symbol of the input block, andoutputting the output block.
 8. The apparatus of claim 7, wherein thetransceiver is configured to receive the input stream comprising groupsof at least four consecutive data symbols and groups of at least fourconsecutive control symbols, wherein each of the groups of the at leastfour consecutive control symbols includes at least three general controlsymbols and ends with a delimiter control symbol, wherein the sequenceof blocks includes at least one block having a group of at least fourconsecutive data symbols beginning at each available symbol position. 9.The apparatus of claim 7, wherein the transcoder is configured togenerate a fourth indicator of the indicator output symbol the fourthindicator indicating whether remaining symbols positioned after thesecond indicator in the at least one output block comprise at least onecontrol symbol.
 10. The apparatus of claim 9, wherein responsive to theat least one input block ending with a control symbol, the transcoder isfurther configured to compress a last control symbol of the input blockand combine the first indicator, the fourth indicator, and thecompressed last control symbol into a compressed control symbol of thecontrol/data block of the output block.
 11. The apparatus of claim 7,wherein the transcoder is configured to determine the first indicator atleast in part by setting a most significant bit of the indicator outputsymbol of the output block to represent the first indicator.
 12. Theapparatus of claim 9, wherein the transcoder is configured to determinethe fourth indicator at least in party by setting a least significantbit of the indicator output symbol of the output block to represent theindicator.
 13. A non-transitory computer-readable medium having embeddedthereon a program, the program being executable by a processor forperforming a method for transcoding data, the method comprising:receiving, at a device, an input stream of data partitioned into asequence of blocks having a fixed length number of symbols, the sequenceof blocks including an input block comprising at least one data symbol,at least one general control symbol, and a delimiter control symbol;generating a synchronization block of an output block indicating whetherthe input block comprises at least one of the at least one generalcontrol symbol and the delimiter control symbol; generating indicatoroutput symbol of a control/data block of the output block, the indicatoroutput symbol comprising at least a first indicator comprising a firstvalue if the input block ends with a general control symbol or thedelimiter control symbol and the first indicator comprising a secondvalue if the input symbol ends with a data symbol, a second indicatorindicating a position of the delimiter control symbol in the inputblock, and a third indicator indicating one or more positions of datasymbols appearing before the delimiter control symbol in the inputblock; generating one or more control/data output symbols of thecontrol/data block of the output block, the one or more control/datasymbols including the at least one data symbol of the input block andthe at least one general control symbol of the input block; andoutputting the output block.
 14. The computer-readable medium of claim13, wherein the received input stream comprises groups of at least fourconsecutive data symbols and groups of at least four consecutive controlsymbols, wherein each of the groups of at least four consecutive controlsymbols includes at least three general control symbols and ends with adelimiter control symbol, wherein the sequence of blocks includes atleast one block having a group of at least four consecutive data symbolsbeginning at each available symbol position.
 15. The computer-readablemedium of claim 13, wherein the indicator output symbol furthercomprises a fourth indicator indicating whether remaining symbolspositioned after the fourth indicator in the at least one output blockcomprise at least one control symbol.